package com.huawei.classroom.student.h05;

public class WarFactory extends GameObject{
	public WarFactory() {
		this.health = 100;
	}
	public Tank building(EnumObjectType which) {
		if(which.equals(EnumObjectType.mediumTank)) {
			return new MediumTank();
		}else if(which.equals(EnumObjectType.heavyTank)) {
			return new HeavyTank();
		}else {
			throw new ClassCastException();
		}
	}
}
